﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using yncTech.BusinessObjects;

public partial class Admin_Sys_Sec_Sec004a : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        TSUsers user = new TSUsers();
        user.LoadByPrimaryKey(LoginUserInfo.CurrentUser.UserID);

        if (user.Password.Equals(txtOldPwd.Text))
        {
            user.Password = txtNewPwd.Text;
            user.Save();
            lbMessage.Text = "密码修改成功,请牢记您的新密码!";
        }
        else
        {
            lbMessage.Text = "原密码不正确!";
        }
    }
}